package com.huffman.smart_picture.service;

import com.huffman.smart_picture.common.UserSession;
import com.huffman.smart_picture.domain.entity.FavoritePictureRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huffman.smart_picture.domain.request.picture.PictureFavoriteRequest;

/**
* @author LinDeng
* @description 针对表【favorite_picture_record(用户点赞记录表)】的数据库操作Service
* @createDate 2025-05-06 16:08:50
*/
public interface FavoritePictureRecordService extends IService<FavoritePictureRecord> {
    /**
     * 用户点赞图片
     * @param pictureFavoriteRequest
     * @param userSession
     * @return
     */
    boolean doFavoritePicture(PictureFavoriteRequest pictureFavoriteRequest, UserSession userSession);


    /**
     * 用户取消点赞图片
     * @param pictureFavoriteRequest
     * @param userSession
     * @return
     */
    boolean undoFavoritePicture(PictureFavoriteRequest pictureFavoriteRequest, UserSession userSession);

    /**
     * 判断指定用户是否对指定图片是否点赞
     * @param userId
     * @param pictureId
     * @return
     */
    boolean haveFavoritePictureRecord(Long userId, Long pictureId);
}
